package pl.rgolcz.antnet;

import java.util.List;
import java.util.ArrayList;

public class MyGraph
{
    List<List<Integer>> graph = new ArrayList<>();
    List<List<Float>> dist = new ArrayList<>();
    
    public MyGraph()
    {
        
    }
    
    public int addVertex()
    {
        graph.add(new ArrayList<Integer>());
        dist.add(new ArrayList<Float>());
        assert graph.size() == dist.size();
        return graph.size();
    }
    
    public void addEdge(int a, int b, float distance)
    {
        graph.get(a-1).add(b);
        graph.get(b-1).add(a);
        dist.get(a-1).add(distance);
        dist.get(b-1).add(distance);
    }
    
}
